package com.sddz.pacs.entity;

import java.util.Date;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.validator.constraints.NotBlank;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 系统字典信息表
 * </p>
 *
 * @author 时代电子
 * @since 2018-05-16
 */
public class SysDict extends Model<SysDict> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private String id;

    /**
     * 父级ID
     */
    private String parentId;

    /**
     * 父级ID
     */
    //pc端显示字典标识      为数据库的key
    @NotBlank(message = "请输入字典标识!")
    private String key;

    /**
     * 字典编码
     */
    @NotBlank(message = "请输入字典编码!")
    private String code;

    /**
     * 中文名称
     */
    @NotBlank(message = "请输入中文名称!")
    private String name;

    /**
     * 字典值
     */
    private String value;

    /**
     * 类型（0.目录1.字典码）
     */
    private String type;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date createDate;

    /**
     * 创建人ID
     */
    private String createUserid;

    /**
     * 修改人ID
     */
    private String updateUserid;

    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date updateDate;

    /**
     * 备注
     */
    private String remark;

    @TableField(exist = false)
    private List<SysDict> children;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }
    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }
    public String getCreateUserid() {
        return createUserid;
    }

    public void setCreateUserid(String createUserid) {
        this.createUserid = createUserid;
    }
    public String getUpdateUserid() {
        return updateUserid;
    }

    public void setUpdateUserid(String updateUserid) {
        this.updateUserid = updateUserid;
    }
    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public List<SysDict> getChildren() {
        return children;
    }

    public void setChildren(List<SysDict> children) {
        this.children = children;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "SysDict{" +
        "id=" + id +
        ", parentId=" + parentId +
        ", key=" + key +
        ", code=" + code +
        ", name=" + name +
        ", value=" + value +
        ", type=" + type +
        ", createDate=" + createDate +
        ", createUserid=" + createUserid +
        ", updateUserid=" + updateUserid +
        ", updateDate=" + updateDate +
        ", remark=" + remark +
        "}";
    }
}
